3.1.28 \(\int (c+d x)^n (A+B x+C x^2+D x^3) \, dx\) [28]

3.1.28.1 Optimal result
3.1.28.2 Mathematica [A] (verified)
3.1.28.3 Rubi [A] (verified)
3.1.28.4 Maple [B] (verified)
3.1.28.5 Fricas [B] (verification not implemented)
3.1.28.6 Sympy [B] (verification not implemented)
3.1.28.7 Maxima [A] (verification not implemented)
3.1.28.8 Giac [B] (verification not implemented)
3.1.28.9 Mupad [F(-1)]

3.1.28.1 Optimal result

Integrand size = 23, antiderivative size = 126 \[ \int (c+d x)^n \left (A+B x+C x^2+D x^3\right ) \, dx=\frac {\left (c^2 C d-B c d^2+A d^3-c^3 D\right ) (c+d x)^{1+n}}{d^4 (1+n)}-\frac {\left (2 c C d-B d^2-3 c^2 D\right ) (c+d x)^{2+n}}{d^4 (2+n)}+\frac {(C d-3 c D) (c+d x)^{3+n}}{d^4 (3+n)}+\frac {D (c+d x)^{4+n}}{d^4 (4+n)} \]

output
(A*d^3-B*c*d^2+C*c^2*d-D*c^3)*(d*x+c)^(1+n)/d^4/(1+n)-(-B*d^2+2*C*c*d-3*D* 
c^2)*(d*x+c)^(2+n)/d^4/(2+n)+(C*d-3*D*c)*(d*x+c)^(3+n)/d^4/(3+n)+D*(d*x+c) 
^(4+n)/d^4/(4+n)
 
3.1.28.2 Mathematica [A] (verified)

Time = 0.14 (sec) , antiderivative size = 108, normalized size of antiderivative = 0.86 \[ \int (c+d x)^n \left (A+B x+C x^2+D x^3\right ) \, dx=\frac {(c+d x)^{1+n} \left (\frac {c^2 C d-B c d^2+A d^3-c^3 D}{1+n}+\frac {\left (-2 c C d+B d^2+3 c^2 D\right ) (c+d x)}{2+n}+\frac {(C d-3 c D) (c+d x)^2}{3+n}+\frac {D (c+d x)^3}{4+n}\right )}{d^4} \]

input
Integrate[(c + d*x)^n*(A + B*x + C*x^2 + D*x^3),x]
 
output
((c + d*x)^(1 + n)*((c^2*C*d - B*c*d^2 + A*d^3 - c^3*D)/(1 + n) + ((-2*c*C 
*d + B*d^2 + 3*c^2*D)*(c + d*x))/(2 + n) + ((C*d - 3*c*D)*(c + d*x)^2)/(3 
+ n) + (D*(c + d*x)^3)/(4 + n)))/d^4
 
3.1.28.3 Rubi [A] (verified)

Time = 0.29 (sec) , antiderivative size = 126, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.087, Rules used = {2389, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int (c+d x)^n \left (A+B x+C x^2+D x^3\right ) \, dx\)

\(\Big \downarrow \) 2389

\(\displaystyle \int \left (\frac {(c+d x)^n \left (A d^3-B c d^2+c^3 (-D)+c^2 C d\right )}{d^3}+\frac {(c+d x)^{n+1} \left (B d^2+3 c^2 D-2 c C d\right )}{d^3}+\frac {(C d-3 c D) (c+d x)^{n+2}}{d^3}+\frac {D (c+d x)^{n+3}}{d^3}\right )dx\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {(c+d x)^{n+1} \left (A d^3-B c d^2+c^3 (-D)+c^2 C d\right )}{d^4 (n+1)}-\frac {(c+d x)^{n+2} \left (-B d^2-3 c^2 D+2 c C d\right )}{d^4 (n+2)}+\frac {(C d-3 c D) (c+d x)^{n+3}}{d^4 (n+3)}+\frac {D (c+d x)^{n+4}}{d^4 (n+4)}\)

input
Int[(c + d*x)^n*(A + B*x + C*x^2 + D*x^3),x]
 
output
((c^2*C*d - B*c*d^2 + A*d^3 - c^3*D)*(c + d*x)^(1 + n))/(d^4*(1 + n)) - (( 
2*c*C*d - B*d^2 - 3*c^2*D)*(c + d*x)^(2 + n))/(d^4*(2 + n)) + ((C*d - 3*c* 
D)*(c + d*x)^(3 + n))/(d^4*(3 + n)) + (D*(c + d*x)^(4 + n))/(d^4*(4 + n))
 

3.1.28.3.1 Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 2389
Int[(Pq_)*((a_) + (b_.)*(x_)^(n_.))^(p_.), x_Symbol] :> Int[ExpandIntegrand 
[Pq*(a + b*x^n)^p, x], x] /; FreeQ[{a, b, n}, x] && PolyQ[Pq, x] && (IGtQ[p 
, 0] || EqQ[n, 1])
 
3.1.28.4 Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(307\) vs. \(2(126)=252\).

Time = 1.61 (sec) , antiderivative size = 308, normalized size of antiderivative = 2.44

method result size
gosper \(\frac {\left (d x +c \right )^{1+n} \left (D d^{3} n^{3} x^{3}+C \,d^{3} n^{3} x^{2}+6 D d^{3} n^{2} x^{3}+B \,d^{3} n^{3} x +7 C \,d^{3} n^{2} x^{2}-3 D c \,d^{2} n^{2} x^{2}+11 D d^{3} n \,x^{3}+A \,d^{3} n^{3}+8 B \,d^{3} n^{2} x -2 C c \,d^{2} n^{2} x +14 C \,d^{3} n \,x^{2}-9 D c \,d^{2} n \,x^{2}+6 D x^{3} d^{3}+9 A \,d^{3} n^{2}-B c \,d^{2} n^{2}+19 B \,d^{3} n x -10 C c \,d^{2} n x +8 C \,d^{3} x^{2}+6 D c^{2} d n x -6 D c \,d^{2} x^{2}+26 A \,d^{3} n -7 B c \,d^{2} n +12 B \,d^{3} x +2 C \,c^{2} d n -8 C c \,d^{2} x +6 D c^{2} d x +24 A \,d^{3}-12 B c \,d^{2}+8 C \,c^{2} d -6 D c^{3}\right )}{d^{4} \left (n^{4}+10 n^{3}+35 n^{2}+50 n +24\right )}\) \(308\)
norman \(\frac {D x^{4} {\mathrm e}^{n \ln \left (d x +c \right )}}{4+n}+\frac {c \left (A \,d^{3} n^{3}+9 A \,d^{3} n^{2}-B c \,d^{2} n^{2}+26 A \,d^{3} n -7 B c \,d^{2} n +2 C \,c^{2} d n +24 A \,d^{3}-12 B c \,d^{2}+8 C \,c^{2} d -6 D c^{3}\right ) {\mathrm e}^{n \ln \left (d x +c \right )}}{d^{4} \left (n^{4}+10 n^{3}+35 n^{2}+50 n +24\right )}+\frac {\left (C d n +D c n +4 C d \right ) x^{3} {\mathrm e}^{n \ln \left (d x +c \right )}}{d \left (n^{2}+7 n +12\right )}+\frac {\left (B \,d^{2} n^{2}+C c d \,n^{2}+7 B \,d^{2} n +4 C c d n -3 D c^{2} n +12 B \,d^{2}\right ) x^{2} {\mathrm e}^{n \ln \left (d x +c \right )}}{d^{2} \left (n^{3}+9 n^{2}+26 n +24\right )}+\frac {\left (A \,d^{3} n^{3}+B c \,d^{2} n^{3}+9 A \,d^{3} n^{2}+7 B c \,d^{2} n^{2}-2 C \,c^{2} d \,n^{2}+26 A \,d^{3} n +12 B c \,d^{2} n -8 C \,c^{2} d n +6 D c^{3} n +24 A \,d^{3}\right ) x \,{\mathrm e}^{n \ln \left (d x +c \right )}}{d^{3} \left (n^{4}+10 n^{3}+35 n^{2}+50 n +24\right )}\) \(361\)
parallelrisch \(\frac {B \,x^{2} \left (d x +c \right )^{n} c \,d^{4} n^{3}+B x \left (d x +c \right )^{n} c^{2} d^{3} n^{3}+14 C \,x^{3} \left (d x +c \right )^{n} c \,d^{4} n +5 C \,x^{2} \left (d x +c \right )^{n} c^{2} d^{3} n^{2}+2 D x^{3} \left (d x +c \right )^{n} c^{2} d^{3} n -3 D x^{2} \left (d x +c \right )^{n} c^{3} d^{2} n^{2}+9 A x \left (d x +c \right )^{n} c \,d^{4} n^{2}+7 C \,x^{3} \left (d x +c \right )^{n} c \,d^{4} n^{2}+C \,x^{2} \left (d x +c \right )^{n} c^{2} d^{3} n^{3}+11 D x^{4} \left (d x +c \right )^{n} c \,d^{4} n +19 B \,x^{2} \left (d x +c \right )^{n} c \,d^{4} n +7 B x \left (d x +c \right )^{n} c^{2} d^{3} n^{2}+8 C \left (d x +c \right )^{n} c^{4} d +24 A \left (d x +c \right )^{n} c^{2} d^{3}-12 B \left (d x +c \right )^{n} c^{3} d^{2}-2 C x \left (d x +c \right )^{n} c^{3} d^{2} n^{2}-3 D x^{2} \left (d x +c \right )^{n} c^{3} d^{2} n +26 A x \left (d x +c \right )^{n} c \,d^{4} n +12 B x \left (d x +c \right )^{n} c^{2} d^{3} n +9 A \left (d x +c \right )^{n} c^{2} d^{3} n^{2}+12 B \,x^{2} \left (d x +c \right )^{n} c \,d^{4}-B \left (d x +c \right )^{n} c^{3} d^{2} n^{2}+24 A x \left (d x +c \right )^{n} c \,d^{4}+26 A \left (d x +c \right )^{n} c^{2} d^{3} n -7 B \left (d x +c \right )^{n} c^{3} d^{2} n +2 C \left (d x +c \right )^{n} c^{4} d n -8 C x \left (d x +c \right )^{n} c^{3} d^{2} n +6 D x \left (d x +c \right )^{n} c^{4} d n +6 D x^{4} \left (d x +c \right )^{n} c \,d^{4}+A \left (d x +c \right )^{n} c^{2} d^{3} n^{3}+8 C \,x^{3} \left (d x +c \right )^{n} c \,d^{4}+8 B \,x^{2} \left (d x +c \right )^{n} c \,d^{4} n^{2}+D x^{4} \left (d x +c \right )^{n} c \,d^{4} n^{3}+C \,x^{3} \left (d x +c \right )^{n} c \,d^{4} n^{3}+6 D x^{4} \left (d x +c \right )^{n} c \,d^{4} n^{2}+D x^{3} \left (d x +c \right )^{n} c^{2} d^{3} n^{3}-6 D \left (d x +c \right )^{n} c^{5}+4 C \,x^{2} \left (d x +c \right )^{n} c^{2} d^{3} n +A x \left (d x +c \right )^{n} c \,d^{4} n^{3}+3 D x^{3} \left (d x +c \right )^{n} c^{2} d^{3} n^{2}}{\left (4+n \right ) \left (3+n \right ) \left (2+n \right ) \left (1+n \right ) d^{4} c}\) \(760\)

input
int((d*x+c)^n*(D*x^3+C*x^2+B*x+A),x,method=_RETURNVERBOSE)
 
output
1/d^4*(d*x+c)^(1+n)/(n^4+10*n^3+35*n^2+50*n+24)*(D*d^3*n^3*x^3+C*d^3*n^3*x 
^2+6*D*d^3*n^2*x^3+B*d^3*n^3*x+7*C*d^3*n^2*x^2-3*D*c*d^2*n^2*x^2+11*D*d^3* 
n*x^3+A*d^3*n^3+8*B*d^3*n^2*x-2*C*c*d^2*n^2*x+14*C*d^3*n*x^2-9*D*c*d^2*n*x 
^2+6*D*d^3*x^3+9*A*d^3*n^2-B*c*d^2*n^2+19*B*d^3*n*x-10*C*c*d^2*n*x+8*C*d^3 
*x^2+6*D*c^2*d*n*x-6*D*c*d^2*x^2+26*A*d^3*n-7*B*c*d^2*n+12*B*d^3*x+2*C*c^2 
*d*n-8*C*c*d^2*x+6*D*c^2*d*x+24*A*d^3-12*B*c*d^2+8*C*c^2*d-6*D*c^3)
 
3.1.28.5 Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 394 vs. \(2 (127) = 254\).

Time = 0.27 (sec) , antiderivative size = 394, normalized size of antiderivative = 3.13 \[ \int (c+d x)^n \left (A+B x+C x^2+D x^3\right ) \, dx=\frac {{\left (A c d^{3} n^{3} - 6 \, D c^{4} + 8 \, C c^{3} d - 12 \, B c^{2} d^{2} + 24 \, A c d^{3} + {\left (D d^{4} n^{3} + 6 \, D d^{4} n^{2} + 11 \, D d^{4} n + 6 \, D d^{4}\right )} x^{4} + {\left (8 \, C d^{4} + {\left (D c d^{3} + C d^{4}\right )} n^{3} + {\left (3 \, D c d^{3} + 7 \, C d^{4}\right )} n^{2} + 2 \, {\left (D c d^{3} + 7 \, C d^{4}\right )} n\right )} x^{3} - {\left (B c^{2} d^{2} - 9 \, A c d^{3}\right )} n^{2} + {\left (12 \, B d^{4} + {\left (C c d^{3} + B d^{4}\right )} n^{3} - {\left (3 \, D c^{2} d^{2} - 5 \, C c d^{3} - 8 \, B d^{4}\right )} n^{2} - {\left (3 \, D c^{2} d^{2} - 4 \, C c d^{3} - 19 \, B d^{4}\right )} n\right )} x^{2} + {\left (2 \, C c^{3} d - 7 \, B c^{2} d^{2} + 26 \, A c d^{3}\right )} n + {\left (24 \, A d^{4} + {\left (B c d^{3} + A d^{4}\right )} n^{3} - {\left (2 \, C c^{2} d^{2} - 7 \, B c d^{3} - 9 \, A d^{4}\right )} n^{2} + 2 \, {\left (3 \, D c^{3} d - 4 \, C c^{2} d^{2} + 6 \, B c d^{3} + 13 \, A d^{4}\right )} n\right )} x\right )} {\left (d x + c\right )}^{n}}{d^{4} n^{4} + 10 \, d^{4} n^{3} + 35 \, d^{4} n^{2} + 50 \, d^{4} n + 24 \, d^{4}} \]

input
integrate((d*x+c)^n*(D*x^3+C*x^2+B*x+A),x, algorithm="fricas")
 
output
(A*c*d^3*n^3 - 6*D*c^4 + 8*C*c^3*d - 12*B*c^2*d^2 + 24*A*c*d^3 + (D*d^4*n^ 
3 + 6*D*d^4*n^2 + 11*D*d^4*n + 6*D*d^4)*x^4 + (8*C*d^4 + (D*c*d^3 + C*d^4) 
*n^3 + (3*D*c*d^3 + 7*C*d^4)*n^2 + 2*(D*c*d^3 + 7*C*d^4)*n)*x^3 - (B*c^2*d 
^2 - 9*A*c*d^3)*n^2 + (12*B*d^4 + (C*c*d^3 + B*d^4)*n^3 - (3*D*c^2*d^2 - 5 
*C*c*d^3 - 8*B*d^4)*n^2 - (3*D*c^2*d^2 - 4*C*c*d^3 - 19*B*d^4)*n)*x^2 + (2 
*C*c^3*d - 7*B*c^2*d^2 + 26*A*c*d^3)*n + (24*A*d^4 + (B*c*d^3 + A*d^4)*n^3 
 - (2*C*c^2*d^2 - 7*B*c*d^3 - 9*A*d^4)*n^2 + 2*(3*D*c^3*d - 4*C*c^2*d^2 + 
6*B*c*d^3 + 13*A*d^4)*n)*x)*(d*x + c)^n/(d^4*n^4 + 10*d^4*n^3 + 35*d^4*n^2 
 + 50*d^4*n + 24*d^4)
 
3.1.28.6 Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 3798 vs. \(2 (112) = 224\).

Time = 1.15 (sec) , antiderivative size = 3798, normalized size of antiderivative = 30.14 \[ \int (c+d x)^n \left (A+B x+C x^2+D x^3\right ) \, dx=\text {Too large to display} \]

input
integrate((d*x+c)**n*(D*x**3+C*x**2+B*x+A),x)
 
output
Piecewise((c**n*(A*x + B*x**2/2 + C*x**3/3 + D*x**4/4), Eq(d, 0)), (-2*A*d 
**3/(6*c**3*d**4 + 18*c**2*d**5*x + 18*c*d**6*x**2 + 6*d**7*x**3) - B*c*d* 
*2/(6*c**3*d**4 + 18*c**2*d**5*x + 18*c*d**6*x**2 + 6*d**7*x**3) - 3*B*d** 
3*x/(6*c**3*d**4 + 18*c**2*d**5*x + 18*c*d**6*x**2 + 6*d**7*x**3) - 2*C*c* 
*2*d/(6*c**3*d**4 + 18*c**2*d**5*x + 18*c*d**6*x**2 + 6*d**7*x**3) - 6*C*c 
*d**2*x/(6*c**3*d**4 + 18*c**2*d**5*x + 18*c*d**6*x**2 + 6*d**7*x**3) - 6* 
C*d**3*x**2/(6*c**3*d**4 + 18*c**2*d**5*x + 18*c*d**6*x**2 + 6*d**7*x**3) 
+ 6*D*c**3*log(c/d + x)/(6*c**3*d**4 + 18*c**2*d**5*x + 18*c*d**6*x**2 + 6 
*d**7*x**3) + 11*D*c**3/(6*c**3*d**4 + 18*c**2*d**5*x + 18*c*d**6*x**2 + 6 
*d**7*x**3) + 18*D*c**2*d*x*log(c/d + x)/(6*c**3*d**4 + 18*c**2*d**5*x + 1 
8*c*d**6*x**2 + 6*d**7*x**3) + 27*D*c**2*d*x/(6*c**3*d**4 + 18*c**2*d**5*x 
 + 18*c*d**6*x**2 + 6*d**7*x**3) + 18*D*c*d**2*x**2*log(c/d + x)/(6*c**3*d 
**4 + 18*c**2*d**5*x + 18*c*d**6*x**2 + 6*d**7*x**3) + 18*D*c*d**2*x**2/(6 
*c**3*d**4 + 18*c**2*d**5*x + 18*c*d**6*x**2 + 6*d**7*x**3) + 6*D*d**3*x** 
3*log(c/d + x)/(6*c**3*d**4 + 18*c**2*d**5*x + 18*c*d**6*x**2 + 6*d**7*x** 
3), Eq(n, -4)), (-A*d**3/(2*c**2*d**4 + 4*c*d**5*x + 2*d**6*x**2) - B*c*d* 
*2/(2*c**2*d**4 + 4*c*d**5*x + 2*d**6*x**2) - 2*B*d**3*x/(2*c**2*d**4 + 4* 
c*d**5*x + 2*d**6*x**2) + 2*C*c**2*d*log(c/d + x)/(2*c**2*d**4 + 4*c*d**5* 
x + 2*d**6*x**2) + 3*C*c**2*d/(2*c**2*d**4 + 4*c*d**5*x + 2*d**6*x**2) + 4 
*C*c*d**2*x*log(c/d + x)/(2*c**2*d**4 + 4*c*d**5*x + 2*d**6*x**2) + 4*C...
 
3.1.28.7 Maxima [A] (verification not implemented)

Time = 0.22 (sec) , antiderivative size = 234, normalized size of antiderivative = 1.86 \[ \int (c+d x)^n \left (A+B x+C x^2+D x^3\right ) \, dx=\frac {{\left (d^{2} {\left (n + 1\right )} x^{2} + c d n x - c^{2}\right )} {\left (d x + c\right )}^{n} B}{{\left (n^{2} + 3 \, n + 2\right )} d^{2}} + \frac {{\left (d x + c\right )}^{n + 1} A}{d {\left (n + 1\right )}} + \frac {{\left ({\left (n^{2} + 3 \, n + 2\right )} d^{3} x^{3} + {\left (n^{2} + n\right )} c d^{2} x^{2} - 2 \, c^{2} d n x + 2 \, c^{3}\right )} {\left (d x + c\right )}^{n} C}{{\left (n^{3} + 6 \, n^{2} + 11 \, n + 6\right )} d^{3}} + \frac {{\left ({\left (n^{3} + 6 \, n^{2} + 11 \, n + 6\right )} d^{4} x^{4} + {\left (n^{3} + 3 \, n^{2} + 2 \, n\right )} c d^{3} x^{3} - 3 \, {\left (n^{2} + n\right )} c^{2} d^{2} x^{2} + 6 \, c^{3} d n x - 6 \, c^{4}\right )} {\left (d x + c\right )}^{n} D}{{\left (n^{4} + 10 \, n^{3} + 35 \, n^{2} + 50 \, n + 24\right )} d^{4}} \]

input
integrate((d*x+c)^n*(D*x^3+C*x^2+B*x+A),x, algorithm="maxima")
 
output
(d^2*(n + 1)*x^2 + c*d*n*x - c^2)*(d*x + c)^n*B/((n^2 + 3*n + 2)*d^2) + (d 
*x + c)^(n + 1)*A/(d*(n + 1)) + ((n^2 + 3*n + 2)*d^3*x^3 + (n^2 + n)*c*d^2 
*x^2 - 2*c^2*d*n*x + 2*c^3)*(d*x + c)^n*C/((n^3 + 6*n^2 + 11*n + 6)*d^3) + 
 ((n^3 + 6*n^2 + 11*n + 6)*d^4*x^4 + (n^3 + 3*n^2 + 2*n)*c*d^3*x^3 - 3*(n^ 
2 + n)*c^2*d^2*x^2 + 6*c^3*d*n*x - 6*c^4)*(d*x + c)^n*D/((n^4 + 10*n^3 + 3 
5*n^2 + 50*n + 24)*d^4)
 
3.1.28.8 Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 728 vs. \(2 (127) = 254\).

Time = 0.28 (sec) , antiderivative size = 728, normalized size of antiderivative = 5.78 \[ \int (c+d x)^n \left (A+B x+C x^2+D x^3\right ) \, dx=\frac {{\left (d x + c\right )}^{n} D d^{4} n^{3} x^{4} + {\left (d x + c\right )}^{n} D c d^{3} n^{3} x^{3} + {\left (d x + c\right )}^{n} C d^{4} n^{3} x^{3} + 6 \, {\left (d x + c\right )}^{n} D d^{4} n^{2} x^{4} + {\left (d x + c\right )}^{n} C c d^{3} n^{3} x^{2} + {\left (d x + c\right )}^{n} B d^{4} n^{3} x^{2} + 3 \, {\left (d x + c\right )}^{n} D c d^{3} n^{2} x^{3} + 7 \, {\left (d x + c\right )}^{n} C d^{4} n^{2} x^{3} + 11 \, {\left (d x + c\right )}^{n} D d^{4} n x^{4} + {\left (d x + c\right )}^{n} B c d^{3} n^{3} x + {\left (d x + c\right )}^{n} A d^{4} n^{3} x - 3 \, {\left (d x + c\right )}^{n} D c^{2} d^{2} n^{2} x^{2} + 5 \, {\left (d x + c\right )}^{n} C c d^{3} n^{2} x^{2} + 8 \, {\left (d x + c\right )}^{n} B d^{4} n^{2} x^{2} + 2 \, {\left (d x + c\right )}^{n} D c d^{3} n x^{3} + 14 \, {\left (d x + c\right )}^{n} C d^{4} n x^{3} + 6 \, {\left (d x + c\right )}^{n} D d^{4} x^{4} + {\left (d x + c\right )}^{n} A c d^{3} n^{3} - 2 \, {\left (d x + c\right )}^{n} C c^{2} d^{2} n^{2} x + 7 \, {\left (d x + c\right )}^{n} B c d^{3} n^{2} x + 9 \, {\left (d x + c\right )}^{n} A d^{4} n^{2} x - 3 \, {\left (d x + c\right )}^{n} D c^{2} d^{2} n x^{2} + 4 \, {\left (d x + c\right )}^{n} C c d^{3} n x^{2} + 19 \, {\left (d x + c\right )}^{n} B d^{4} n x^{2} + 8 \, {\left (d x + c\right )}^{n} C d^{4} x^{3} - {\left (d x + c\right )}^{n} B c^{2} d^{2} n^{2} + 9 \, {\left (d x + c\right )}^{n} A c d^{3} n^{2} + 6 \, {\left (d x + c\right )}^{n} D c^{3} d n x - 8 \, {\left (d x + c\right )}^{n} C c^{2} d^{2} n x + 12 \, {\left (d x + c\right )}^{n} B c d^{3} n x + 26 \, {\left (d x + c\right )}^{n} A d^{4} n x + 12 \, {\left (d x + c\right )}^{n} B d^{4} x^{2} + 2 \, {\left (d x + c\right )}^{n} C c^{3} d n - 7 \, {\left (d x + c\right )}^{n} B c^{2} d^{2} n + 26 \, {\left (d x + c\right )}^{n} A c d^{3} n + 24 \, {\left (d x + c\right )}^{n} A d^{4} x - 6 \, {\left (d x + c\right )}^{n} D c^{4} + 8 \, {\left (d x + c\right )}^{n} C c^{3} d - 12 \, {\left (d x + c\right )}^{n} B c^{2} d^{2} + 24 \, {\left (d x + c\right )}^{n} A c d^{3}}{d^{4} n^{4} + 10 \, d^{4} n^{3} + 35 \, d^{4} n^{2} + 50 \, d^{4} n + 24 \, d^{4}} \]

input
integrate((d*x+c)^n*(D*x^3+C*x^2+B*x+A),x, algorithm="giac")
 
output
((d*x + c)^n*D*d^4*n^3*x^4 + (d*x + c)^n*D*c*d^3*n^3*x^3 + (d*x + c)^n*C*d 
^4*n^3*x^3 + 6*(d*x + c)^n*D*d^4*n^2*x^4 + (d*x + c)^n*C*c*d^3*n^3*x^2 + ( 
d*x + c)^n*B*d^4*n^3*x^2 + 3*(d*x + c)^n*D*c*d^3*n^2*x^3 + 7*(d*x + c)^n*C 
*d^4*n^2*x^3 + 11*(d*x + c)^n*D*d^4*n*x^4 + (d*x + c)^n*B*c*d^3*n^3*x + (d 
*x + c)^n*A*d^4*n^3*x - 3*(d*x + c)^n*D*c^2*d^2*n^2*x^2 + 5*(d*x + c)^n*C* 
c*d^3*n^2*x^2 + 8*(d*x + c)^n*B*d^4*n^2*x^2 + 2*(d*x + c)^n*D*c*d^3*n*x^3 
+ 14*(d*x + c)^n*C*d^4*n*x^3 + 6*(d*x + c)^n*D*d^4*x^4 + (d*x + c)^n*A*c*d 
^3*n^3 - 2*(d*x + c)^n*C*c^2*d^2*n^2*x + 7*(d*x + c)^n*B*c*d^3*n^2*x + 9*( 
d*x + c)^n*A*d^4*n^2*x - 3*(d*x + c)^n*D*c^2*d^2*n*x^2 + 4*(d*x + c)^n*C*c 
*d^3*n*x^2 + 19*(d*x + c)^n*B*d^4*n*x^2 + 8*(d*x + c)^n*C*d^4*x^3 - (d*x + 
 c)^n*B*c^2*d^2*n^2 + 9*(d*x + c)^n*A*c*d^3*n^2 + 6*(d*x + c)^n*D*c^3*d*n* 
x - 8*(d*x + c)^n*C*c^2*d^2*n*x + 12*(d*x + c)^n*B*c*d^3*n*x + 26*(d*x + c 
)^n*A*d^4*n*x + 12*(d*x + c)^n*B*d^4*x^2 + 2*(d*x + c)^n*C*c^3*d*n - 7*(d* 
x + c)^n*B*c^2*d^2*n + 26*(d*x + c)^n*A*c*d^3*n + 24*(d*x + c)^n*A*d^4*x - 
 6*(d*x + c)^n*D*c^4 + 8*(d*x + c)^n*C*c^3*d - 12*(d*x + c)^n*B*c^2*d^2 + 
24*(d*x + c)^n*A*c*d^3)/(d^4*n^4 + 10*d^4*n^3 + 35*d^4*n^2 + 50*d^4*n + 24 
*d^4)
 
3.1.28.9 Mupad [F(-1)]

Timed out. \[ \int (c+d x)^n \left (A+B x+C x^2+D x^3\right ) \, dx=\int {\left (c+d\,x\right )}^n\,\left (A+B\,x+C\,x^2+x^3\,D\right ) \,d x \]

input
int((c + d*x)^n*(A + B*x + C*x^2 + x^3*D),x)
 
output
int((c + d*x)^n*(A + B*x + C*x^2 + x^3*D), x)